package com.suke.money.mapper;

import com.suke.money.model.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //查询 平台总人数
    Long selectUserCount();

    //注册：根据手机号码 查询用户 数量
    Integer selectUserCountByPhone(String phone);

    //登录：登录
    User selectUserByPhoneAndPasswd(@Param("phone") String phone, @Param("loginPassword") String loginPassword);
    //User selectUserByPhoneAndPasswd(String phone, String loginPassword);

    //查询：根据手机号查询注册用户
    User selectUserByPhone(String phone);
}